package com.kingdee.eas.fi.gl.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import com.kingdee.eas.ma.bg.BgCtrlParam;
import com.kingdee.eas.framework.app.BillBaseControllerBean;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.fi.gl.VoucherCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.fi.gl.VoucherInfo;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.eas.framework.CoreBillBaseCollection;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.util.BOSUuid;
import java.util.List;
import java.util.Vector;
import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.fi.gl.cslacct.CheckViewInfo;
import java.util.Map;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Date;
import com.kingdee.eas.fi.gl.GLPeriodEndFilter;
import com.kingdee.eas.fi.cas.JournalCollection;
import com.kingdee.eas.basedata.org.CompanyOrgUnitInfo;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import java.util.Set;
import com.kingdee.eas.fi.gl.VoucherOperateStatusEnum;
import com.kingdee.eas.fi.gl.VoucherStatusEnum;
import com.kingdee.eas.framework.SystemEnum;
import com.kingdee.eas.fi.gl.VoucherAssistRecordCollection;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.framework.BillBaseCollection;
import java.util.Collection;
import com.kingdee.eas.framework.ObjectBaseCollection;



public abstract class AbstractVoucherControllerBean extends BillBaseControllerBean implements VoucherController
{
    protected AbstractVoucherControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("2652E01E");
    }

    public VoucherCollection getVoucherCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d46d5155-00f9-1000-e000-000ac0a8106f"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            VoucherCollection retValue = (VoucherCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public VoucherCollection getVoucherCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d46d5155-00f9-1000-e000-000bc0a8106f"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            VoucherCollection retValue = (VoucherCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public VoucherCollection getVoucherCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9f8984ed-00fb-1000-e000-000ac0a81279"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            VoucherCollection retValue = (VoucherCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public IObjectPK exteriorSubmit(Context ctx, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9f8984ed-00fb-1000-e000-000bc0a81279"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_exteriorSubmit(ctx, model);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _exteriorSubmit(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public IObjectPK exteriorSave(Context ctx, IObjectValue model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b9e23e46-00fb-1000-e000-0001c0a81279"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_exteriorSave(ctx, model);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _exteriorSave(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public VoucherInfo generateReverseVoucher(Context ctx, String srcVchId, Object[] genParam) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("af9d97fb-00fb-1000-e000-0003c0a81279"), new Object[]{ctx, srcVchId, genParam});
            invokeServiceBefore(svcCtx);
            VoucherInfo retValue = (VoucherInfo)_generateReverseVoucher(ctx, srcVchId, genParam);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _generateReverseVoucher(Context ctx, String srcVchId, Object[] genParam) throws BOSException, EASBizException;

    public void auditVoucher(Context ctx, IObjectPK pk, BOSUuid auditorId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0001c0a81279"), new Object[]{ctx, pk, auditorId});
            invokeServiceBefore(svcCtx);
            _auditVoucher(ctx, pk, auditorId);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _auditVoucher(Context ctx, IObjectPK pk, BOSUuid auditorId) throws BOSException, EASBizException;

    public void antiAuditVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0002c0a81279"), new Object[]{ctx, pk, preStatus});
            invokeServiceBefore(svcCtx);
            _antiAuditVoucher(ctx, pk, preStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiAuditVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException;

    public void checkVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0003c0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _checkVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void checkVoucher(Context ctx, IObjectCollection journalCollection, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c2b5688b-0104-1000-e000-0010c0a8127a"), new Object[]{ctx, journalCollection, pk});
            invokeServiceBefore(svcCtx);
            _checkVoucher(ctx, journalCollection, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucher(Context ctx, IObjectCollection journalCollection, IObjectPK pk) throws BOSException, EASBizException;

    public void antiCheckVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0004c0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _antiCheckVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiCheckVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void postVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0005c0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _postVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void autoPostVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("076982a1-0107-1000-e000-003cc0a8127a"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _autoPostVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _autoPostVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void antiPostVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0006c0a81279"), new Object[]{ctx, pk, preStatus});
            invokeServiceBefore(svcCtx);
            _antiPostVoucher(ctx, pk, preStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiPostVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException;

    public void cancelVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0007c0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _cancelVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _cancelVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void antiCancelVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("00ccb964-00fc-1000-e000-0008c0a81279"), new Object[]{ctx, pk, preStatus});
            invokeServiceBefore(svcCtx);
            _antiCancelVoucher(ctx, pk, preStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiCancelVoucher(Context ctx, IObjectPK pk, VoucherStatusEnum preStatus) throws BOSException, EASBizException;

    public void bgAuditVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc05b2ff-00fc-1000-e000-0001c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _bgAuditVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _bgAuditVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void antiBgAuditVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc05b2ff-00fc-1000-e000-0002c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _antiBgAuditVoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiBgAuditVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void bgAndAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc05b2ff-00fc-1000-e000-0003c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _bgAndAudit(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _bgAndAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void antiBgAndAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bc05b2ff-00fc-1000-e000-0004c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _antiBgAndAudit(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiBgAndAudit(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean hasVoucherInCurrentPeriod(Context ctx, BOSUuid prdId, SystemEnum sys) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("bebf50d7-00fc-1000-e000-0001c0a81279"), new Object[]{ctx, prdId, sys});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_hasVoucherInCurrentPeriod(ctx, prdId, sys);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _hasVoucherInCurrentPeriod(Context ctx, BOSUuid prdId, SystemEnum sys) throws BOSException, EASBizException;

    public void setSubmitStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c93e8c34-00fc-1000-e000-0001c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _setSubmitStatus(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _setSubmitStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void setCheckStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c93e8c34-00fc-1000-e000-0002c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _setCheckStatus(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _setCheckStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void setAuditStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c93e8c34-00fc-1000-e000-0003c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _setAuditStatus(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _setAuditStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public VoucherInfo exteriorLazyLoad(Context ctx, VoucherInfo voucherInfo, SelectorItemCollection selectorItemCollection) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("504b7fef-00fd-1000-e000-0001c0a81278"), new Object[]{ctx, voucherInfo, selectorItemCollection});
            invokeServiceBefore(svcCtx);
            VoucherInfo retValue = (VoucherInfo)_exteriorLazyLoad(ctx, voucherInfo, selectorItemCollection);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract VoucherInfo _exteriorLazyLoad(Context ctx, VoucherInfo voucherInfo, SelectorItemCollection selectorItemCollection) throws BOSException, EASBizException;

    public BgCtrlParam[] getBgCtrlParamFromVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6e8147a3-00fd-1000-e000-0001c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            BgCtrlParam[] retValue = (BgCtrlParam[])_getBgCtrlParamFromVoucher(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract BgCtrlParam[] _getBgCtrlParamFromVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean existsCashOrBankAccount(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("9dd4938d-00fd-1000-e000-0001c0a81278"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_existsCashOrBankAccount(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _existsCashOrBankAccount(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public HashMap fetchAllCustProp(Context ctx, Vector entryIds) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e0f47045-00fe-1000-e000-0003c0a81279"), new Object[]{ctx, entryIds});
            invokeServiceBefore(svcCtx);
            HashMap retValue = (HashMap)_fetchAllCustProp(ctx, entryIds);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract HashMap _fetchAllCustProp(Context ctx, Vector entryIds) throws BOSException, EASBizException;

    public void deleteBySys(Context ctx, Vector vecPK, SystemEnum sys) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e73cd5d7-00fe-1000-e000-0003c0a81279"), new Object[]{ctx, vecPK, sys});
            invokeServiceBefore(svcCtx);
            _deleteBySys(ctx, vecPK, sys);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deleteBySys(Context ctx, Vector vecPK, SystemEnum sys) throws BOSException, EASBizException;

    public void deleteWebService(Context ctx, Vector vctPK, CompanyOrgUnitInfo companyOrgUnitInfomation) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ea4fbe3e-010e-1000-e000-003ac0a812a2"), new Object[]{ctx, vctPK, companyOrgUnitInfomation});
            invokeServiceBefore(svcCtx);
            _deleteWebService(ctx, vctPK, companyOrgUnitInfomation);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deleteWebService(Context ctx, Vector vctPK, IObjectValue companyOrgUnitInfomation) throws BOSException, EASBizException;

    public void deleteFun(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("12953b4c-010f-1000-e000-003ac0a812d1"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _deleteFun(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deleteFun(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean isHandcraftVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("fb6164ec-00fe-1000-e000-0002c0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isHandcraftVoucher(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isHandcraftVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public Collection getReq(Context ctx, BOSUuid vchId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b55e1a8e-0100-1000-e000-0003c0a81279"), new Object[]{ctx, vchId});
            invokeServiceBefore(svcCtx);
            Collection retValue = (Collection)_getReq(ctx, vchId);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Collection _getReq(Context ctx, BOSUuid vchId) throws BOSException, EASBizException;

    public Collection getReq(Context ctx, CheckViewInfo cond) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b55e1a8e-0100-1000-e000-0004c0a81279"), new Object[]{ctx, cond});
            invokeServiceBefore(svcCtx);
            Collection retValue = (Collection)_getReq(ctx, cond);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Collection _getReq(Context ctx, CheckViewInfo cond) throws BOSException, EASBizException;

    public void modifyReqStatus(Context ctx, VoucherAssistRecordCollection records) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b55e1a8e-0100-1000-e000-0005c0a81279"), new Object[]{ctx, records});
            invokeServiceBefore(svcCtx);
            _modifyReqStatus(ctx, records);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _modifyReqStatus(Context ctx, IObjectCollection records) throws BOSException, EASBizException;

    public boolean mustCheckReq(Context ctx, String[] vchIds, String comId, String periodId, Date date) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("45c41fac-0101-1000-e000-0009c0a81279"), new Object[]{ctx, vchIds, comId, periodId, date});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_mustCheckReq(ctx, vchIds, comId, periodId, date);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _mustCheckReq(Context ctx, String[] vchIds, String comId, String periodId, Date date) throws BOSException, EASBizException;

    public IObjectPK submitVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6f1476b0-0101-1000-e000-000dc0a81279"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_submitVoucher(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _submitVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void checkVoucherValidForChecking(Context ctx, String voucherId, VoucherOperateStatusEnum status) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("df519642-0104-1000-e000-0176c0a812a3"), new Object[]{ctx, voucherId, status});
            invokeServiceBefore(svcCtx);
            _checkVoucherValidForChecking(ctx, voucherId, status);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherValidForChecking(Context ctx, String voucherId, VoucherOperateStatusEnum status) throws BOSException, EASBizException;

    public void postVoucherCollection(Context ctx, List pkList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("be2a3ca8-0105-1000-e000-0015c0a8127a"), new Object[]{ctx, pkList});
            invokeServiceBefore(svcCtx);
            _postVoucherCollection(ctx, pkList);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postVoucherCollection(Context ctx, List pkList) throws BOSException, EASBizException;

    public boolean isAuditStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("cc3c4c7c-0105-1000-e000-0050c0a8127a"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isAuditStatus(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isAuditStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean isPostStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("cc3c4c7c-0105-1000-e000-0051c0a8127a"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isPostStatus(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isPostStatus(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean unclosePeriod(Context ctx, VoucherInfo model) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ce98dbcc-0105-1000-e000-02cfc0a8127a"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_unclosePeriod(ctx, model);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _unclosePeriod(Context ctx, IObjectValue model) throws BOSException;

    public void checkVoucher(Context ctx, VoucherInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0a8717bf-0106-1000-e000-0013c0a8129f"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _checkVoucher(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucher(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void checkVoucher(Context ctx, String id) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0f3d1f9a-0106-1000-e000-0014c0a8129f"), new Object[]{ctx, id});
            invokeServiceBefore(svcCtx);
            _checkVoucher(ctx, id);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucher(Context ctx, String id) throws BOSException, EASBizException;

    public void checkVoucherCollection(Context ctx, List pkList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6dbcf4d7-0106-1000-e000-0045c0a8127a"), new Object[]{ctx, pkList});
            invokeServiceBefore(svcCtx);
            _checkVoucherCollection(ctx, pkList);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherCollection(Context ctx, List pkList) throws BOSException, EASBizException;

    public void postVoucherCollection(Context ctx, List pkList, GLPeriodEndFilter filter) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("901f0d57-0106-1000-e000-0015c0a8127a"), new Object[]{ctx, pkList, filter});
            invokeServiceBefore(svcCtx);
            _postVoucherCollection(ctx, pkList, filter);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postVoucherCollection(Context ctx, List pkList, GLPeriodEndFilter filter) throws BOSException, EASBizException;

    public void chechVoucherBatch(Context ctx, List pkList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("5e7b9a96-0107-1000-e000-0016c0a8127a"), new Object[]{ctx, pkList});
            invokeServiceBefore(svcCtx);
            _chechVoucherBatch(ctx, pkList);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _chechVoucherBatch(Context ctx, List pkList) throws BOSException, EASBizException;

    public void postCheckValid(Context ctx, IObjectPK pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1dac75f9-010b-1000-e000-001bc0a8127a"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _postCheckValid(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postCheckValid(Context ctx, IObjectPK pk) throws BOSException;

    public boolean checkVoucherForAudit(Context ctx, IObjectPK id, String accountNumber, int entryDc, String settlementTypeNumber, BigDecimal amount, String comparetype) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("88e45de7-010b-1000-e000-0227c0a812d1"), new Object[]{ctx, id, accountNumber, new Integer(entryDc), settlementTypeNumber, amount, comparetype});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_checkVoucherForAudit(ctx, id, accountNumber, entryDc, settlementTypeNumber, amount, comparetype);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _checkVoucherForAudit(Context ctx, IObjectPK id, String accountNumber, int entryDc, String settlementTypeNumber, BigDecimal amount, String comparetype) throws BOSException, EASBizException;

    public BigDecimal getAmoutBySettlement(Context ctx, IObjectPK id, String accountNUmber, int entryDc, String settlementNumber, BigDecimal amount, String compareType) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a8ca9dec-010b-1000-e000-0045c0a812d1"), new Object[]{ctx, id, accountNUmber, new Integer(entryDc), settlementNumber, amount, compareType});
            invokeServiceBefore(svcCtx);
            BigDecimal retValue = (BigDecimal)_getAmoutBySettlement(ctx, id, accountNUmber, entryDc, settlementNumber, amount, compareType);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract BigDecimal _getAmoutBySettlement(Context ctx, IObjectPK id, String accountNUmber, int entryDc, String settlementNumber, BigDecimal amount, String compareType) throws BOSException;

    public void autoAntiPostvoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6868f41f-010c-1000-e000-007cc0a812d1"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _autoAntiPostvoucher(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _autoAntiPostvoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void checkVoucherByEntry(Context ctx, String entryId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dbea66c8-010c-1000-e000-003ec0a8126a"), new Object[]{ctx, entryId});
            invokeServiceBefore(svcCtx);
            _checkVoucherByEntry(ctx, entryId);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherByEntry(Context ctx, String entryId) throws BOSException, EASBizException;

    public void checkVoucherValidForCheckingByEntry(Context ctx, String entryid, VoucherOperateStatusEnum status) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dbea66c8-010c-1000-e000-003fc0a8126a"), new Object[]{ctx, entryid, status});
            invokeServiceBefore(svcCtx);
            _checkVoucherValidForCheckingByEntry(ctx, entryid, status);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherValidForCheckingByEntry(Context ctx, String entryid, VoucherOperateStatusEnum status) throws BOSException, EASBizException;

    public void antiCheckVoucherByEntry(Context ctx, IObjectPK entryPK) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dbea66c8-010c-1000-e000-0040c0a8126a"), new Object[]{ctx, entryPK});
            invokeServiceBefore(svcCtx);
            _antiCheckVoucherByEntry(ctx, entryPK);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _antiCheckVoucherByEntry(Context ctx, IObjectPK entryPK) throws BOSException, EASBizException;

    public void checkVoucherByEntry(Context ctx, JournalCollection coll, IObjectPK entrypk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dbea66c8-010c-1000-e000-0046c0a8126a"), new Object[]{ctx, coll, entrypk});
            invokeServiceBefore(svcCtx);
            _checkVoucherByEntry(ctx, coll, entrypk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherByEntry(Context ctx, IObjectCollection coll, IObjectPK entrypk) throws BOSException, EASBizException;

    public void checkVoucherByEntries(Context ctx, Set idsset) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dd39ff76-010c-1000-e000-0060c0a8126a"), new Object[]{ctx, idsset});
            invokeServiceBefore(svcCtx);
            _checkVoucherByEntries(ctx, idsset);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkVoucherByEntries(Context ctx, Set idsset) throws BOSException, EASBizException;

    public String adjustNumber(Context ctx, String id, boolean isSystem, String number) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("c585e095-010e-1000-e000-003ac0a812d1"), new Object[]{ctx, id, new Boolean(isSystem), number});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_adjustNumber(ctx, id, isSystem, number);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _adjustNumber(Context ctx, String id, boolean isSystem, String number) throws BOSException, EASBizException;

    public List requisitionCheckData(Context ctx, String strPeriod, int unChecked, int checked) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("20aa867f-0111-1000-e000-003ec0a812c0"), new Object[]{ctx, strPeriod, new Integer(unChecked), new Integer(checked)});
            invokeServiceBefore(svcCtx);
            List retValue = (List)_requisitionCheckData(ctx, strPeriod, unChecked, checked);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract List _requisitionCheckData(Context ctx, String strPeriod, int unChecked, int checked) throws BOSException, EASBizException;

    public IObjectPK[] batchSave(Context ctx, IObjectCollection voucherCols) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d37122ff-0114-1000-e000-009ec0a8122b"), new Object[]{ctx, voucherCols});
            invokeServiceBefore(svcCtx);
            IObjectPK[] retValue = (IObjectPK[])_batchSave(ctx, voucherCols);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK[] _batchSave(Context ctx, IObjectCollection voucherCols) throws BOSException, EASBizException;

    public IObjectPK reverseSave(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d37122ff-0114-1000-e000-009fc0a8122b"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_reverseSave(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _reverseSave(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public String managerNumber(Context ctx, String tempNumberq, boolean hasHandNumber, IObjectValue voucher) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f8774a2b-0114-1000-e000-008dc0a8122b"), new Object[]{ctx, tempNumberq, new Boolean(hasHandNumber), voucher});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_managerNumber(ctx, tempNumberq, hasHandNumber, voucher);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _managerNumber(Context ctx, String tempNumberq, boolean hasHandNumber, IObjectValue voucher) throws BOSException, EASBizException;

    public VoucherInfo generateReverseVoucherBatch(Context ctx, List srcVchIdList, Object[] genParam) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a4d8361b-0116-1000-e000-0040c0a8122a"), new Object[]{ctx, srcVchIdList, genParam});
            invokeServiceBefore(svcCtx);
            VoucherInfo retValue = (VoucherInfo)_generateReverseVoucherBatch(ctx, srcVchIdList, genParam);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _generateReverseVoucherBatch(Context ctx, List srcVchIdList, Object[] genParam) throws BOSException, EASBizException;

    public IObjectPK reverseSaveBatch(Context ctx, List pkList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a4d8361b-0116-1000-e000-0041c0a8122a"), new Object[]{ctx, pkList});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_reverseSaveBatch(ctx, pkList);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _reverseSaveBatch(Context ctx, List pkList) throws BOSException, EASBizException;

    public void postVoucherOneByOne(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("fedf9cf4-fbfd-4931-b7c3-478a696cbc1c"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _postVoucherOneByOne(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postVoucherOneByOne(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void postSingleVoucher(Context ctx, Map allParam, String vchid, int vchIndex) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f916235c-20fc-4d64-8636-bc7f656a4e31"), new Object[]{ctx, allParam, vchid, new Integer(vchIndex)});
            invokeServiceBefore(svcCtx);
            _postSingleVoucher(ctx, allParam, vchid, vchIndex);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _postSingleVoucher(Context ctx, Map allParam, String vchid, int vchIndex) throws BOSException, EASBizException;

    public IObjectValue getVoucherWithoutPermissionCheck(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("32880946-589f-498e-9a99-f5fe252519d2"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            IObjectValue retValue = (IObjectValue)_getVoucherWithoutPermissionCheck(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectValue _getVoucherWithoutPermissionCheck(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public boolean auditBackVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f99381da-d42a-4160-b527-a1ca187f8f88"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_auditBackVoucher(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _auditBackVoucher(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public String getOpinionID(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ec2e1fa7-e24f-49a2-8bd7-61e301e6b7fd"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_getOpinionID(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _getOpinionID(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public IObjectPK submitAccountAdjustVoucher(Context ctx, VoucherInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b9b61fde-3087-4438-8585-87d9572084b5"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_submitAccountAdjustVoucher(ctx, model);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _submitAccountAdjustVoucher(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void checkACNoticeCorrelation(Context ctx, String vchId) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("45465081-ed85-4a79-bb47-d47c76424976"), new Object[]{ctx, vchId});
            invokeServiceBefore(svcCtx);
            _checkACNoticeCorrelation(ctx, vchId);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkACNoticeCorrelation(Context ctx, String vchId) throws BOSException, EASBizException;

    public void delete(Context ctx, IObjectPK pk, SystemEnum fromSys) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("802c20b5-d12d-438e-a7bf-852066a98697"), new Object[]{ctx, pk, fromSys});
            invokeServiceBefore(svcCtx);
            _delete(ctx, pk, fromSys);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _delete(Context ctx, IObjectPK pk, SystemEnum fromSys) throws BOSException, EASBizException;

    public BillBaseCollection getBillBaseCollection (Context ctx) throws BOSException
    {
    	return (BillBaseCollection)(getVoucherCollection(ctx).cast(BillBaseCollection.class));
    }
    public BillBaseCollection getBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (BillBaseCollection)(getVoucherCollection(ctx, view).cast(BillBaseCollection.class));
    }
    public BillBaseCollection getBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (BillBaseCollection)(getVoucherCollection(ctx, oql).cast(BillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBillBaseCollection)(getVoucherCollection(ctx).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBillBaseCollection)(getVoucherCollection(ctx, view).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBillBaseCollection)(getVoucherCollection(ctx, oql).cast(CoreBillBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getVoucherCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getVoucherCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getVoucherCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getVoucherCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getVoucherCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getVoucherCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}